home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Jun, 1997
- //
- // Description:
- // This file is called to update the 6th icon
- // to the left of the shelf.
- //
- // Input Arguments:
- // None
- //
- // Return Value:
- // None.
- //
- global proc changeToolIcon() {
-
- string $currentTool = `currentCtx`;
- global string $gshowManip;
- global string $gSelect;
- global string $gLasso;
- global string $gMove;
- global string $gRotate;
- global string $gScale;
- global string $gCurrentSacredTool;
- global string $gNonSacredToolWidget;
- global string $gNonSacredTool;
- global string $gToolBox;
-
- if ($currentTool == $gCurrentSacredTool) {
- }
- else if ($currentTool == $gSelect) {
- $gCurrentSacredTool = $gSelect;
- }
- else if ($currentTool == $gLasso) {
- $gCurrentSacredTool = $gLasso;
- }
- else if ($currentTool == $gshowManip) {
- $gCurrentSacredTool = $gshowManip;
- }
- else if ($currentTool == $gMove) {
- $gCurrentSacredTool = $gMove;
- }
- else if ($currentTool == $gScale) {
- $gCurrentSacredTool = $gScale;
- }
- else if ($currentTool == $gRotate) {
- $gCurrentSacredTool = $gRotate;
- }
- else if ( `contextInfo -exists $currentTool` ){
- string $newIcon = `contextInfo -image1 $currentTool`;
-
- if ($newIcon != "") {
- if (`gridLayout -q -exists $gToolBox`) {
- setParent $gToolBox;
- toolButton -edit -enable true
- -t $currentTool
- -i1 $newIcon
- $gNonSacredToolWidget;
-
- string $selected = `toolCollection -q -sl toolCluster`;
- if ( $selected == "" || $selected == "NONE" || $currentTool != `toolButton -q -t $selected` ) {
- toolButton -e -sl $gNonSacredToolWidget;
- }
- }
- } else {
- if (`toolButton -q -exists $gNonSacredToolWidget`) {
- toolButton -edit -enable false
- -i1 "vacantCell.xpm" $gNonSacredToolWidget;
- }
- }
- $gNonSacredTool = $currentTool;
- }
-
- }
-